<?php if (!isset($v_sval)) exit;

	$img_id = (isset($_REQUEST["img_id"])) ? $_REQUEST["img_id"] : 0;
	$v_account_id = $user_id;
	if ( $img_id ){
		$sql = 'UPDATE TB_IMAGE SET ACCOUNT_AVATAR = 0 WHERE ACCOUNT_ID = "'.$v_account_id.'"';
		mysql_query($sql) or die (mysql_error());
		$sql = 'UPDATE TB_IMAGE SET ACCOUNT_AVATAR = 1 WHERE IMAGE_ID = "'.$img_id.'"';
		mysql_query($sql) or die (mysql_error());
	}

?>	
